Video encoding devices have been used for efficiently transmitting or recording videos. Examples of a specific video encoding method employed in a video encoding device encompass H.264/MPEG-4 AVC (described in Non Patent Literature 1) and a method employed in KTA software which is a joint development codec in VCEG (Video Coding Expert Group).
According to such an encoding method, an image (picture) constituting a video is managed in a hierarchical structure which is constituted by (i) a plurality of slices into which the image is divided, (ii) a plurality of macro blocks into which each of the plurality of slices is divided, and (iii) a plurality of sub blocks into which each of the plurality of macro blocks is divided. The encoding is generally carried out per sub block.
Further, according to such an encoding method, a prediction image is generally generated on the basis of a locally-decoded image obtained by encoding/decoding an input image. Difference data between the prediction image and the input image is encoded. Further, examples of a method of generating a prediction image encompass a method called “inter-frame prediction (inter prediction)” and a method called “intra-frame prediction (intra prediction)”.
In the inter prediction, (i) motion compensation employing a motion vector is applied to a reference image in such a reference frame that an entire frame is decoded, and, as a result, (ii) a prediction image in a prediction target frame is generated. Further, in the inter prediction, it is possible to generate a prediction image by referring to a plurality of reference images. In this case, the prediction image is generated by use of such a value that a pixel value of each of the plurality of reference images is multiplied by a weighting factor.
Meanwhile, in the intra prediction, prediction images are sequentially generated in such a manner that a prediction image in a frame is generated on the basis of a locally-decoded image in the frame. Specifically, the intra prediction is generally such that (i) one of prediction directions included in a predetermined prediction direction (prediction mode) group is selected for each of a plurality of prediction units (e.g., a sub block) constituting a unit region (e.g., a macro block), (ii) a pixel value of a reference pixel in a locally-decoded image is extrapolated in the one of prediction directions thus selected, and, as a result, (iii) a prediction pixel value(s) on a prediction target region is generated.
As described above, a prediction image is generally generated on the basis of a prediction parameter (such as a motion vector, a weighting factor, and a prediction mode).